package designmode.simplefactory;

public class SimpleFactory {
    public Pizza createPizza(String orderType){
        Pizza pizza=null;
        if ("greek".equals(orderType)){
            pizza=new GreekPizza();
        }
        return pizza;//根据传进来的类型进行不同的对象创建,返回对应的对象
    }
}
